package home.projects.recipes.chapone;

public class ReportService {

   private IReportGenerator reportGenerator;

   public void setReportGenerator(IReportGenerator reportGenerator) {
      this.reportGenerator = reportGenerator;
   }

   public void generateMonthlyReport(String[][] data) {
      System.out.println("Generating monthly report");
      System.out.print('\t');
      reportGenerator.generate(data);
   }

   public void generateAnnualReport(String[][] data) {
      System.out.println("Generating annual report");
      System.out.print('\t');
      reportGenerator.generate(data);
   }

}
